<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateGoodslistsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('goodslists', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('rank')->unsigned()->nullable()->comment('等级');
			$table->string('name')->nullable()->comment('品名');
			$table->string('goodsType')->nullable()->comment('规格');
			$table->string('unit')->nullable()->comment('计算单位');
			$table->float('price')->unsigned()->nullable()->comment('单价');
			$table->string('storage')->nullable()->comment('库房');
			$table->string('info')->nullable()->comment('属性');
			$table->float('rate')->unsigned()->nullable()->comment('比率');
			$table->float('weight')->unsigned()->nullable()->comment('重量');
			$table->string('weightUnit')->nullable()->comment('重量单位');
			$table->string('log')->nullable()->comment('记录');
			$table->string('notes')->nullable()->comment('备注');
			$table->string('bom')->nullable()->comment('bom信息');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('goodslists');
	}

}
